﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace QLTV.Forms.KhaiBao
{
    public partial class frmSinhNhatThuyenVien : DevExpress.XtraEditors.XtraForm
    {
        public frmSinhNhatThuyenVien()
        {
            InitializeComponent();
        }
        public int thang { get; set; }


        private void frmSinhNhatThuyenVien_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dsCrew.tblViewCrew' table. You can move, or remove it, as needed.
            this.tblViewCrewTableAdapter.DanhSachSN(this.dsCrew.tblViewCrew, thang);

        }

        private void viewSinhNhat_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            if (e.Column == colStt)
            {
                e.DisplayText = (e.RowHandle + 1).ToString();
            }
        }

        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            SaveFileDialog f = new SaveFileDialog();
            f.Filter = "Excel (*.xls)|*.xls";
            if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                viewSinhNhat.ExportToXls(f.FileName);
            }
        }
    }
}